﻿//
// Copyright (c) 2024 BPer
//

#ifndef BPERDECODER_SRC_BPerDecoderLibde265_H_
#define BPERDECODER_SRC_BPerDecoderLibde265_H_
#include <bperdecoder/BPerVideoDecoder.h>
#include <bperutil/sys/BPerLoadLib.h>
#include <bperutil/BPerType.h>

class BPerDecoderLibde265: public BPerVideoDecoder {
public:
	BPerDecoderLibde265();
	virtual ~BPerDecoderLibde265();
	void parseRtmpHeader(uint8_t *p, int32_t pLen, int32_t *pwid, int32_t *phei, int32_t *pfps);
	void init();
	int32_t decode(BPerFrame* videoFrame,BPerYuvType yuvtype,BPerDecoderCallback* pcallback);

private:
	uint8_t* m_buffer;
	int32_t m_bufLen;
private:

	void getH264RtmpHeader(uint8_t *buf, uint8_t *src, int32_t *hLen);

};

#endif /* BPERDECODER_SRC_BPERH264DECODERSOFT_H_ */
